package com.demo.message;


import com.demo.AppletConstant;
import com.demo.util.Utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * 小程序模板消息
 *
 */
public class AppletMsg {
	public static void main(String[] args) {

		//调用接口地址
		String url = "https://open.95516.com/open/access/1.0/applet.msg";
		
		//拼装参数Map
		Map params = new HashMap(0);

		params.put("appId", AppletConstant.APP_ID);

		params.put("openId", AppletConstant.openId);

		params.put("backendToken", AppletConstant.backendToken);
		params.put("mpId", "");
		params.put("isPush", "");
		params.put("extra01", "");
		params.put("extra02", "");
		params.put("templateId", "");
		params.put("desc", "");
		params.put("uiType", "");
		params.put("adImageUrl", "");
		params.put("adTargetUrl", "");
		params.put("destExt", "");
		params.put("destType", "");
		params.put("destInfo", "");

		List<Map<String ,String>> list = new ArrayList<Map<String, String>>();
		Map<String,String> map = new HashMap<String, String>();
		map.put("key","");
		map.put("value","");
		list.add(map);

		params.put("valueList", list);

		//发送请求
		String resultStr = Utils.sendPostGson(url, params);
		
		System.out.println("-------小程序模板消息:"+resultStr+"---------");
	}
	
}
